package inet.app.vod.config;

import java.io.File;

import android.content.Context;
import android.os.Environment;
import android.util.SparseArray;

import com.inet.app.framework.device.DeviceUtil;

public class AppConstants {

	public static final String SERVER_HOST = "210.211.99.196";
	public static final String SERVER_PORT = "8000";
	public static final String SERVER_TOKEN_PORT = "18000";

	public static final String ROOT_NAME = "root";
	public static final String ROOT_PASS = "1234";

	public static final String HOST_IMAGE_URL = "http://iphim.vn/";

	public static final int MENU_IPHIM = 0;
	public static final int MENU_ICLIP = 1;
	public static final int MENU_INEWS = 2;
	public static final int MENU_IFUN = 3;
	public static final int MENU_SHARE_APP = 4;
	public static final int MENU_SEARCH = 5;

	public static final String GESTURE_PLAY = "play";
	public static final String GESTURE_PAUSE = "pause";
	public static final String GESTURE_PLUS_VOLUME = "plus volume";
	public static final String GESTURE_MINUS_VOLUME = "minus volume";
	public static final String GESTURE_MUTE = "mute";
	public static final String GESTURE_SCALE = "scale";
	public static final String GESTURE_CAPTURE = "capture";

	public final static String[] SUBTITLE_FONT = new String[] { "tahoma",
			"time news roman", "sanserif" };

	public final static SparseArray<String> ERROR_CODES = new SparseArray<String>();
	static {
		ERROR_CODES.put(1, "Lỗi từ server :(");
		ERROR_CODES.put(2, "Sai tên đăng nhập hoặc mật khẩu");
		ERROR_CODES.put(3, "Tài khoản chưa Active");
		ERROR_CODES.put(4, "Tài khoản bị khóa");
		ERROR_CODES.put(5, "Tài khoản hoặc email đã tồn tại");
		ERROR_CODES.put(6, "Email đã được sử dụng");
		ERROR_CODES.put(7, "Số điện thoại đã được sử dụng");
		ERROR_CODES.put(8, "Username đã được sử dụng");
		ERROR_CODES.put(9, "Tài khoản không đủ để xem video");
	}

	public final static String NAME_IPHIM = "iPhim";
	public final static String ID_IPHIM = "iphim";

	public final static String NAME_ICLIP = "iClip";
	public final static String ID_ICLIP = "iclip";

	public final static String NAME_INEWS = "iNews";
	public final static String ID_INEWS = "inews";

	public final static String NAME_IFUN = "iFun";
	public final static String ID_IFUN = "ifun";

	public static int START_PAGE = 1;

	public static int getPageSize(Context context) {
		if (DeviceUtil.isTablet(context)) {
			return 10;
		}
		return 4;
	}

	// folder app
	public static final String EXTERNAL_PATH = Environment
			.getExternalStorageDirectory().getPath();

	public static final String FOLDER_ROOT_NAME = "VOD";

	public static final String FOLDER_ROOT_PATH = EXTERNAL_PATH
			+ File.separator + FOLDER_ROOT_NAME;

	public static final String FOLDER_SCREENSHOT = "Screenshots";

	public static final String FOLDER_SCREENSHOT_PATH = FOLDER_ROOT_PATH
			+ File.separator + FOLDER_SCREENSHOT;

	public static final String FOLDER_SUBTILES = "Subtiles";

	public static final String FOLDER_SUBTILES_PATH = FOLDER_ROOT_PATH
			+ File.separator + FOLDER_SUBTILES;

	public static final String FILE_SCREENSHOT = FOLDER_SCREENSHOT_PATH
			+ File.separator + "%s" + File.separator + "%s";

	public static final String LOGO = FOLDER_ROOT_PATH + File.separator
			+ "img_logo.png";

}
